﻿<%@ Page Language="C#" MasterPageFile="~/Admin/MasterPage.master" AutoEventWireup="true"
    CodeFile="AddSubCategory.aspx.cs" Inherits="Admin_AddSubCategory" %>

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="Server">
    <div id="page-heading">
        <h1>
            Add SubCategory</h1>
    </div>
    <table border="0" width="100%" cellpadding="0" cellspacing="0" id="content-table">
        <tr>
            <th rowspan="3" class="sized">
                <img src="images/shared/side_shadowleft.jpg" width="20" height="300" alt="" /></th>
            <th class="topleft">
            </th>
            <td id="tbl-border-top">
                &nbsp;</td>
            <th class="topright">
            </th>
            <th rowspan="3" class="sized">
                <img src="images/shared/side_shadowright.jpg" width="20" height="300" alt="" /></th>
        </tr>
        <tr>
            <td id="tbl-border-left">
            </td>
            <td>
                <!--  start content-table-inner -->
                <div id="content-table-inner">
                    <table border="0" width="100%" cellpadding="0" cellspacing="0">
                        <tr valign="top">
                            <td>
                                <!--  start step-holder -->
                                <!--  end step-holder -->
                                <!-- start id-form -->
                                <table border="0" cellpadding="0" cellspacing="0" id="id-form">
                                    <tr>
                                        <th valign="top">
                                            Title:</th>
                                        <td>
                                            <asp:TextBox ID="txtName" runat="server" Width="250"></asp:TextBox></td><td>
                                        <asp:RequiredFieldValidator Display="Dynamic" ID="RequiredFieldValidator2" runat="server" ControlToValidate="txtName" ErrorMessage="<div class='error-left'></div> <div class='error-inner'><span style='color: White;'> Login Name is not empty</span></div>"></asp:RequiredFieldValidator>
                                        </td>
                                    </tr>
                                    <tr>
                                        <th valign="top">
                                            Category:</th>
                                        <td>
                                            <asp:UpdatePanel runat="server">
                                                <contenttemplate>
                                            <asp:DropDownList ID="ddlCategory" onChange="checkSelect()" runat="server" AutoPostBack="true"
                                                OnSelectedIndexChanged="ddCategory_OnSelectedIndexChanged">
                                            </asp:DropDownList>
                                        <asp:DropDownList ID="ddlSubCategory" runat="server">
                                        </asp:DropDownList>
                                        </contenttemplate>
                                            </asp:UpdatePanel></td><td></td>
                                    </tr>
                                    <tr>
                                        <th valign="top">
                                            Code:</th>
                                        <td>
                                            <asp:TextBox ID="txtcode" runat="server" Width="80px" />
                                        </td>
                                        <td> <asp:RequiredFieldValidator Display="Dynamic" ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtcode" ErrorMessage="<div class='error-left'></div> <div class='error-inner'><span style='color: White;'> Code is not empty</span></div>"></asp:RequiredFieldValidator>
                                        </td>
                                    </tr>
                                    <tr>
                                        <th valign="top">
                                            Order:</th>
                                        <td>
                                            <asp:TextBox ID="txtOrder" runat="server" Width="80px" />
                                        </td>
                                        <td>
                                        </td>
                                    </tr>
                                    <tr>
                                        <th>
                                            &nbsp;</th>
                                        <td valign="top">
                                            <asp:Button ID="btnSave" CssClass="form-submit" Text="Save" runat="server" CausesValidation="true"
                                                OnClick="btnSave_OnClick" />
                                            <asp:Button ID="btnexit" CssClass="form-reset" Text="Reset" runat="server" CausesValidation="False" />
                                        </td>
                                        <td>
                                        </td>
                                    </tr>
                                </table>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <img src="images/shared/blank.gif" width="695" height="1" alt="blank" /></td>
                            <td>
                            </td>
                        </tr>
                    </table>
                    <div class="clear">
                    </div>
                </div>
            </td>
            <td id="tbl-border-right">
            </td>
        </tr>
        <tr>
            <th class="sized bottomleft">
            </th>
            <td id="tbl-border-bottom">
                &nbsp;</td>
            <th class="sized bottomright">
            </th>
        </tr>
    </table>
    <div class="clear">
        &nbsp;</div>

    <script type="text/javascript">
        function checkSelect()
        {
            var dd = document.getElementById("<%=ddlCategory.ClientID%>");
            var btnl=document.getElementById("<%=btnSave.ClientID %>");
            if(dd.value=='0')
            {
                btnl.disabled=true;
            }
            else
            {
                btnl.disabled=false;
            }
        }
        checkSelect();
    </script>

</asp:Content>
